package networking.assignments;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;
import java.net.SocketException;
import java.net.UnknownHostException;

public class Client1 {
	public static void main(String[] args) throws UnknownHostException,
			IOException, SocketException {
		Socket s = new Socket("localhost", 1947);

		DataOutputStream out = new DataOutputStream(s.getOutputStream());
		out.writeUTF("Hello.");

		DataInputStream in = new DataInputStream(s.getInputStream());
		System.out.println(in.readUTF());
	}
}
